diff options
| author | Fuwn <[email protected]> | 2024-09-28 20:34:49 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-09-28 20:34:49 -0700 |
| commit | 012b729e93af661f2eccc2a170404eb6da45f9c7 (patch) | |
| tree | 126a8226301c6a8dbb2b0d599c9053587758a0bf /src/routes/user/[user] | |
| parent | feat(user): move profile page badges to graphql (diff) | |
| download | due.moe-012b729e93af661f2eccc2a170404eb6da45f9c7.tar.xz due.moe-012b729e93af661f2eccc2a170404eb6da45f9c7.zip | |
chore(npm): fix graphql builder
Diffstat (limited to 'src/routes/user/[user]')
| -rw-r--r-- | src/routes/user/[user]/+page.gql | 12 | ||||
| -rw-r--r-- | src/routes/user/[user]/+page.ts | 32 |
2 files changed, 22 insertions, 22 deletions
diff --git a/src/routes/user/[user]/+page.gql b/src/routes/user/[user]/+page.gql index 182969e2..a0ca87c1 100644 --- a/src/routes/user/[user]/+page.gql +++ b/src/routes/user/[user]/+page.gql @@ -1,7 +1,7 @@ query Profile($id: Int!) { - User(id: $id) { - badges { - id - } - } -}
\ No newline at end of file + User(id: $id) { + badges { + id + } + } +} diff --git a/src/routes/user/[user]/+page.ts b/src/routes/user/[user]/+page.ts index 9d498404..c84caafb 100644 --- a/src/routes/user/[user]/+page.ts +++ b/src/routes/user/[user]/+page.ts @@ -1,19 +1,19 @@ -import { load_Profile } from "$houdini" -import { user } from "$lib/Data/AniList/user" -import type { LoadEvent } from "@sveltejs/kit" +import { load_Profile } from '$houdini'; +import { user } from '$lib/Data/AniList/user'; +import type { LoadEvent } from '@sveltejs/kit'; export const load = async (event: LoadEvent) => { - const username = event.params.user as string - const userData = (await - user(username, /^\d+$/.test(username))) + const username = event.params.user as string; + const userData = await user(username, /^\d+$/.test(username)); - return { - ...(await load_Profile({ - event, variables: { - id: userData.id, - } - })), - username, - userData - } -}
\ No newline at end of file + return { + ...(await load_Profile({ + event, + variables: { + id: userData.id + } + })), + username, + userData + }; +}; |